Skip to content

feat: add aiModerated flag to moderateSourcePosts mutation#3778

Merged
pnvasanth merged 1 commit intomainfrom
feat/ai-moderated-flag-v2
Apr 8, 2026
Merged

feat: add aiModerated flag to moderateSourcePosts mutation#3778
pnvasanth merged 1 commit intomainfrom
feat/ai-moderated-flag-v2

Conversation

@pnvasanth
Copy link
Copy Markdown
Contributor

Summary

  • Add optional aiModerated: Boolean parameter to moderateSourcePosts GraphQL mutation
  • When set to true, merges { "aiModerated": true } into the JSONB flags column
  • Enables traceability for AI-automated vs human moderation decisions

Test plan

  • Existing moderation flows unaffected (param is optional, defaults false)
  • When aiModerated: true, verify flags column contains {"aiModerated": true} merged with existing flags

@pulumi
Copy link
Copy Markdown

pulumi Bot commented Apr 8, 2026

🍹 The Update (preview) for dailydotdev/api/prod (at 3f9d073) was successful.

✨ Neo Explanation

Routine deployment of commit `ae9b43cb` — all services get an updated container image, and fresh DB and Clickhouse migration Jobs are created to run any pending schema migrations. ✅ Low Risk

This is a standard application deployment rolling out a new image build (f0e4dd8eae9b43cb) across all services. Every deployment and cron job is receiving only the updated container image tag and version labels — no configuration, resource limits, or behavioral changes.

The two migration Jobs (DB and Clickhouse) follow the expected pattern: the old commit-tagged Jobs are deleted and new ones are created for the incoming commit. This is the normal mechanism for running one-time migrations on each deploy. The new migration Jobs will run against the database/Clickhouse before (or alongside) the rolling update of the application pods.

🔵 Info — The GCP provider warning about missing default credentials is cosmetic; it does not affect the Kubernetes resources being deployed.

Resource Changes

    Name                                                       Type                           Operation
+   vpc-native-api-clickhouse-migration-ae9b43cb               kubernetes:batch/v1:Job        create
~   vpc-native-bg-deployment                                   kubernetes:apps/v1:Deployment  update
~   vpc-native-update-tags-str-cron                            kubernetes:batch/v1:CronJob    update
+   vpc-native-api-db-migration-ae9b43cb                       kubernetes:batch/v1:Job        create
~   vpc-native-rotate-daily-quests-cron                        kubernetes:batch/v1:CronJob    update
~   vpc-native-update-tag-materialized-views-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-stale-user-transactions-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-squad-posts-analytics-refresh-cron              kubernetes:batch/v1:CronJob    update
~   vpc-native-update-achievement-rarity-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-user-companies-cron                kubernetes:batch/v1:CronJob    update
~   vpc-native-update-source-public-threshold-cron             kubernetes:batch/v1:CronJob    update
~   vpc-native-daily-digest-cron                               kubernetes:batch/v1:CronJob    update
~   vpc-native-channel-highlights-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-clickhouse-cron          kubernetes:batch/v1:CronJob    update
~   vpc-native-temporal-deployment                             kubernetes:apps/v1:Deployment  update
~   vpc-native-channel-digests-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-worker-job-deployment                           kubernetes:apps/v1:Deployment  update
~   vpc-native-user-posts-analytics-refresh-cron               kubernetes:batch/v1:CronJob    update
~   vpc-native-ws-deployment                                   kubernetes:apps/v1:Deployment  update
~   vpc-native-user-profile-updated-sync-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-update-highlighted-views-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-rotate-weekly-quests-cron                       kubernetes:batch/v1:CronJob    update
~   vpc-native-materialize-monthly-best-post-archives-cron     kubernetes:batch/v1:CronJob    update
~   vpc-native-generic-referral-reminder-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-calculate-top-readers-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-gifted-plus-cron                          kubernetes:batch/v1:CronJob    update
~   vpc-native-expire-super-agent-trial-cron                   kubernetes:batch/v1:CronJob    update
~   vpc-native-update-current-streak-cron                      kubernetes:batch/v1:CronJob    update
-   vpc-native-api-clickhouse-migration-f0e4dd8e               kubernetes:batch/v1:Job        delete
-   vpc-native-api-db-migration-f0e4dd8e                       kubernetes:batch/v1:Job        delete
~   vpc-native-generate-search-invites-cron                    kubernetes:batch/v1:CronJob    update
~   vpc-native-clean-zombie-opportunities-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-private-deployment                              kubernetes:apps/v1:Deployment  update
~   vpc-native-clean-zombie-users-cron                         kubernetes:batch/v1:CronJob    update
~   vpc-native-check-analytics-report-cron                     kubernetes:batch/v1:CronJob    update
~   vpc-native-update-trending-cron                            kubernetes:batch/v1:CronJob    update
~   vpc-native-validate-active-users-cron                      kubernetes:batch/v1:CronJob    update
~   vpc-native-post-analytics-clickhouse-cron                  kubernetes:batch/v1:CronJob    update
~   vpc-native-sync-subscription-with-cio-cron                 kubernetes:batch/v1:CronJob    update
~   vpc-native-user-profile-analytics-history-clickhouse-cron  kubernetes:batch/v1:CronJob    update
~   vpc-native-personalized-digest-deployment                  kubernetes:apps/v1:Deployment  update
... and 11 other changes

Add an optional `aiModerated` Boolean parameter to the `moderateSourcePosts`
GraphQL mutation. When set to `true`, the mutation merges
`{ aiModerated: true }` into the JSONB `flags` column of the moderated posts.

This enables traceability for AI-automated moderation decisions vs human ones,
used by the squad-moderation automation agent.

Changes:
- Add `aiModerated` to `SourcePostModerationFlags` type
- Add `aiModerated: Boolean` parameter to GraphQL schema
- Merge flag into JSONB using existing `updateFlagsStatement` utility
@pnvasanth pnvasanth force-pushed the feat/ai-moderated-flag-v2 branch from e45f444 to 3f9d073 Compare April 8, 2026 08:24
@pnvasanth pnvasanth merged commit 445570e into main Apr 8, 2026
10 checks passed
@pnvasanth pnvasanth deleted the feat/ai-moderated-flag-v2 branch April 8, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant